package com.rinlink.jbcodec.common;

import java.util.Map;

public class MapUtils {

    public static final Byte getOrDefault(Map map,String key,Byte defaultValue){
        Byte v;
        return (( v = (Byte) map.get(key)) == null ? defaultValue : v);
    }


    public static final Short getOrDefault(Map map,String key,Short defaultValue){
        Short v;
        return (( v = (Short) map.get(key)) == null ? defaultValue : v);
    }

    public static final Integer getOrDefault(Map map,String key,Integer defaultValue){
        Integer v;
        return (( v = (Integer) map.get(key)) == null ? defaultValue : v);
    }


    public static final Float getOrDefault(Map map,String key,Float defaultValue){
        Float v;
        return (( v = (Float) map.get(key)) == null ? defaultValue : v);
    }


    public static final Long getOrDefault(Map map,String key,Long defaultValue){
        Long v;
        return (( v = (Long) map.get(key)) == null ? defaultValue : v);
    }

    public static final Double getOrDefault(Map map,String key,Double defaultValue){
        Double v;
        return (( v = (Double) map.get(key)) == null ? defaultValue : v);
    }

    public static final Boolean getOrDefault(Map map,String key,Boolean defaultValue){
        Boolean v;
        return (( v = (Boolean) map.get(key)) == null ? defaultValue : v);
    }

    public static final String getOrDefault(Map map,String key,String defaultValue){
        String v;
        return (( v = (String) map.get(key)) == null ? defaultValue : v);
    }


}
